home *** CD-ROM | disk | FTP | other *** search
/ isnet Internet / Isnet Internet CD.iso / prog / chat / 12 / 12.exe / SYSTEM / query.als < prev    next >
Encoding:
Text File  |  2000-03-04  |  10.1 KB  |  327 lines

  1. addon {
  2.   if ($1 != $null) ctcp $nc($1) ADDON
  3.   elseif (($query($active)) || ($chan($active))) ctcp $active ADDON
  4.   else iecho Syntax: /addon <nick|chan>
  5. }
  6. ame if ($mychans) describe $mychans $1-
  7. amsg if ($mychans) msg $mychans $1-
  8. cget {
  9.   if ($2 != $null) {
  10.     ctcp $nc($1) CDCC SEND #$2
  11.     if (%autoxdcc == on) set %xdccnicks $addtok(%xdccnicks,$nc($1),32)
  12.   }
  13.   elseif ((($query($active)) || ($chan($active))) && ($1 != $null)) ctcp $active CDCC SEND #$1
  14.   else iecho Syntax: /cget [nick|chan] <pack>
  15. }
  16. chat dcc chat $nc($$1)
  17. clist {
  18.   if ($1 != $null) ctcp $nc($1) CDCC LIST
  19.   elseif (($query($active)) || ($chan($active))) ctcp $active CDCC LIST
  20.   else iecho Syntax: /clist [nick|chan]
  21. }
  22. ctcp {
  23.   if ($0 < 2) {
  24.     iecho Syntax: /ctcp <nick|channel> <request>
  25.     return
  26.   }
  27.   set %ctcpsent -> [ctcp( $+ $1 $+ )] $upper($2) $3-
  28.   if ($form(ircn,ctcp)) iiecho $readini %formats ircn ctcp
  29.   else iiecho $sc(-) $+ > [[ $+ $sc(ctcp) $+ ( $+ $hc($1) $+ )] $upper($2) $3-
  30.   if (($2 == ping) && ($3 == $null)) qctcp $1 PING $ticks
  31.   else qctcp $1 $upper($2) $3-
  32. }
  33. dcc {
  34.   if ($1 == send) {
  35.     dcc $1-
  36.     if (($dialog(ircN.dccstatus) == $null) && (%dccstatus == on)) dccstatus on
  37.   }
  38.   elseif ($1 == chat) dcc $1-
  39.   elseif ($1- != $null) dcc $1-
  40.   else {
  41.     if (($send(0) == 0) && ($get(0) == 0)) {
  42.       iecho Nothing on DCC list.
  43.       return
  44.     }
  45.     iiecho . $+ $str(-,65) $+ .
  46.     iiecho $vl $fix(5,Dnum) $fix(5,Type) $fix(10,Nick) $fix(8,Status) $fix(6,Kps) $fix(3,%) $fix(13,Filename) $fix(6,Size) $vl
  47.     iiecho $vl $+ $str(-,65) $+ $vl
  48.     set %i.dcc 0
  49.     :start
  50.     inc %i.dcc
  51.     if ($get(%i.dcc) != $null) {
  52.       if (($get(%i.dcc).cps == n/a) || ($get(%i.dcc).cps == 0)) set %tmp.dcc 0.00
  53.       else set %tmp.dcc $kps($get(%i.dcc).cps)
  54.       iiecho $vl $lfix(2,$chr(35)) $+ $fix(3,%i.dcc) $fix(5,GET) $fix(10,$hc($get(%i.dcc))) $fix(8,$get(%i.dcc).status) $fix(6,%tmp.dcc) $fix(3,$get(%i.dcc).pc) $fix(13,$hc($get(%i.dcc).file)) $fix(6,$alof($get(%i.dcc).size)) $vl
  55.       goto start
  56.     }
  57.     dec %i.dcc
  58.     set %j.dcc 0
  59.     :start2
  60.     inc %j.dcc
  61.     inc %i.dcc
  62.     if ($send(%j.dcc) != $null) {
  63.       if ($send(%j.dcc).cps == n/a) || ($send(%j.dcc).cps == 0) set %tmp.dcc 0.00
  64.       else set %tmp.dcc $kps($send(%j.dcc).cps)
  65.       iiecho $vl $lfix(2,$chr(35)) $+ $fix(3,%i.dcc) $fix(5,SEND) $fix(10,$hc($send(%j.dcc))) $fix(8,$send(%j.dcc).status) $fix(6,%tmp.dcc) $fix(3,$send(%j.dcc).pc) $fix(13,$hc($send(%j.dcc).file)) $fix(6,$alof($send(%j.dcc).size)) $vl
  66.       goto start2
  67.     }
  68.     iiecho ' $+ $str(-,65) $+ '
  69.   }
  70. }
  71. describe {
  72.   if ($0 < 2) return
  73.   if ($1 ischan) {
  74.     if ($show) {
  75.       if ($form(ircN,describe)) $readini %formats ircN describe
  76.       else echo $colour(Action) -ti2 $1 * $pst($me,$1) $2-
  77.     }
  78.     .describe $1-
  79.   }
  80.   elseif ($chr(44) isin $1) {
  81.     set %i.describe 0
  82.     :start
  83.     inc %i.describe
  84.     if ($gettok($1,%i.describe,44) ischan) {
  85.       if ($show) {
  86.         if ($form(ircN,multidescribe)) $readini %formats ircN multidescribe
  87.         else echo $colour(Action) -ti2 $gettok($1,%i.describe,44) * $pst($me,$gettok($1,%i.describe,44)) $2-
  88.       }
  89.       if (%efnet.hybrid6) .describe $gettok($1,%i.describe,44) $2-
  90.       goto start
  91.     }
  92.     elseif (($gettok($1,%i.describe,44) != $null) && ($left($gettok($1,%i.describe,44),1) != $chr(61))) {
  93.       if ($show) {
  94.         if ($form(ircN,multiprivdescribe)) $readini %formats ircN multiprivdescribe
  95.         else echo $colour(Action) -ai2 $sc(-) $+ > [[ $+ $sc(act) $+ ( $+ $hc($gettok($1,%i.describe,44)) $+ )] * $me $2-
  96.       }
  97.       if (%efnet.hybrid6) .describe $gettok($1,%i.describe,44) $2-
  98.       goto start
  99.     }
  100.     if (%efnet.hybrid6 == $false) .describe $1-
  101.   }
  102.   else {
  103.     if ($show) {
  104.       if ($form(ircN,privdescribe)) $readini %formats ircN privdescribe
  105.       else echo $colour(Action) -ai2 $sc(-) $+ > [[ $+ $sc(act) $+ ( $+ $hc($1) $+ )] * $me $2-
  106.     }
  107.     .describe $1-
  108.   }
  109.   set %msgsent -> [act( $+ $1 $+ )] * $me $2-
  110. }
  111. m msg $nc($1) $2-
  112. mm {
  113.   if (%efnet.hybrid6) {
  114.     iecho Sorry, this command can not be used on HYBRID 6 servers.
  115.     return
  116.   }
  117.   if ($1 != $null) {
  118.     unset %tmp.mm
  119.     set %i.mm 0
  120.     :start
  121.     inc %i.mm
  122.     if ($nick(#,%i.mm) != $null) {
  123.       set %tmp.mm $addtok(%tmp.mm,$nick(#,%i.mm),44)
  124.       goto start
  125.     }
  126.     mmsg %tmp.mm $1-
  127.     set %msgsent -> [msg( $+ # $+ )] $1-
  128.     iiecho $sc(-) $+ > [[ $+ $sc(msg) $+ ( $+ $ac(#) $+ )] $1-
  129.   }
  130.   else iecho Syntax: /mm <message>
  131. }
  132. me {
  133.   if ($chan) {
  134.     if ($show) {
  135.       if ($form(ircN,action)) $readini %formats ircN action
  136.       else echo $colour(Action) -tai2 * $pst($me,$chan) $$1-
  137.     }
  138.     .me $$1-
  139.   }
  140.   else me $$1-
  141. }
  142. msg {
  143.   if ($0 < 2) return
  144.   if ($1 ischan) {
  145.     if ($show) {
  146.       if ($form(ircN,say)) $readini %formats ircN say
  147.       else echo $colour(Own) -ti2 $1 < $+ $pst($me,$1) $+ > $2-
  148.     }
  149.     .msg $1-
  150.   }
  151.   elseif ($chr(44) isin $1) {
  152.     set %i.msg 0
  153.     :start
  154.     inc %i.msg
  155.     if ($gettok($1,%i.msg,44) ischan) {
  156.       if ($show) {
  157.         if ($form(ircN,multisay)) $readini %formats ircN multisay
  158.         else echo $colour(Own) -ti2 $gettok($1,%i.msg,44) < $+ $pst($me,$gettok($1,%i.msg,44)) $+ > $2-
  159.       }
  160.       if (%efnet.hybrid6) .msg $gettok($1,%i.msg,44) $2-
  161.       goto start
  162.     }
  163.     elseif (($gettok($1,%i.msg,44) != $null) && ($left($gettok($1,%i.msg,44),1) != $chr(61))) {
  164.       if ($show) {
  165.         if ($form(ircN,multimsg)) $readini %formats ircN multimsg
  166.         else iiecho $sc(-) $+ > [[ $+ $sc(msg) $+ ( $+ $hc($gettok($1,%i.msg,44)) $+ )] $2-
  167.       }
  168.       if (%efnet.hybrid6) .msg $gettok($1,%i.msg,44) $2-
  169.       goto start
  170.     }
  171.     if (%efnet.hybrid6 == $false) .msg $1-
  172.   }
  173.   elseif ($left($1,1) == $chr(61)) {
  174.     if (($chat($getright($1))) || $fserv($getright($1))) {
  175.       if ($show) msg $1-
  176.       else .msg $1-
  177.     }
  178.   }
  179.   else {
  180.     if (($1 != $active) && ($me !ison $1)) {
  181.       set %msgsent -> [msg( $+ $1 $+ )] $2-
  182.       if (($query($1)) && ($show)) msg $1-
  183.       elseif ($show) {
  184.         if ($form(ircN,msg)) $readini %formats ircN msg
  185.         else iiecho $sc(-) $+ > [[ $+ $sc(msg) $+ ( $+ $hc($1) $+ )] $2-
  186.         .msg $1-
  187.       }
  188.       else .msg $1-
  189.     }
  190.     else msg $1-
  191.   }
  192. }
  193. n notice $1-
  194. names {
  195.   set %jstats on
  196.   if ($1 != $null) .quote names $1-
  197.   else .quote names #
  198. }
  199. notice {
  200.   if ($0 < 2) return
  201.   set %notsent -> [not( $+ $1 $+ )] $2-
  202.   if ($1 ischan) {
  203.     if ($show) {
  204.       if ($form(ircN,channotice)) $readini %formats ircN channotice
  205.       else echo $colour(Notice) -ti2 $1 - $+ $pst($me,$1) $+ : $+ $1 $+ - $2-
  206.     }
  207.     .notice $1-
  208.   }
  209.   elseif ($chr(44) isin $1) {
  210.     set %i.notice 0
  211.     :start
  212.     inc %i.notice
  213.     if ($gettok($1,%i.notice,44) ischan) {
  214.       if ($show) {
  215.         if ($form(ircN,multichannotice)) $readini %formats ircN multichannotice
  216.         else echo $colour(Notice) -ti2 $gettok($1,%i.notice,44) - $+ $pst($me,$gettok($1,%i.notice,44)) $+ : $+ $gettok($1,%i.notice,44) $+ - $2-
  217.       }
  218.       if (%efnet.hybrid6) .notice $gettok($1,%i.notice,44) $2-
  219.       goto start
  220.     }
  221.     elseif (($gettok($1,%i.notice,44) != $null) && ($left($gettok($1,%i.notice,44),1) != $chr(61))) {
  222.       if ($show) {
  223.         if ($form(ircN,multinotice)) iiecho $readini %formats ircN multinotice
  224.         else iiecho $sc(-) $+ > [[ $+ $sc(not) $+ ( $+ $hc($gettok($1,%i.notice,44)) $+ )] $2-
  225.       }
  226.       if (%efnet.hybrid6) .notice $gettok($1,%i.notice,44) $2-
  227.       goto start
  228.     }
  229.     if (%efnet.hybrid6 == $false) .notice $1-
  230.   }
  231.   else {
  232.     if ($show) {
  233.       if ($form(ircn,notice)) iiecho $readini %formats ircn notice
  234.       else iiecho $sc(-) $+ > [[ $+ $sc(not) $+ ( $+ $hc($1) $+ )] $2-
  235.     }
  236.     .notice $1-
  237.   }
  238. }
  239. ping {
  240.   if ($1 != $null) ctcp $nc($1) PING
  241.   elseif (($query($active)) || ($chan($active))) ctcp $active PING
  242.   else iecho Syntax: /ping <nick|chan>
  243. }
  244. q query $$1
  245. say {
  246.   if ($active == @ircII) {
  247.     msg %ircIIchan $1-
  248.     echo -ti2 @ircII < $+ $pst($me,%ircIIchan) $+ : $+ %ircIIchan $+ > $1-
  249.   }
  250.   elseif ($chan ischan) msg $chan $1-
  251.   else say $1-
  252. }
  253. sping {
  254.   set %lagtmp $1-
  255.   if ($1 == $null) set %lagtmp $server
  256.   set %slagtmp on
  257.   set %slag $ticks
  258.   .quote time %lagtmp
  259. }
  260. send dcc send $nc($$1) $2-
  261. svinfo $iif($1,msg,say) $1 %iver has been used %uses times for $b($rsc2($duration($mpy(%pong,60)))) online. Currently on $b(%irc.network) - Up for $duration($div($ticks,1000)) $+ . Currently $full-date $+ .
  262. uptime $iif($1,msg,say) $1 Time is $atime $+ , computer has been up for $rsc2($duration($rrpt($ticks)))
  263. usage $iif($1,msg,say) $1 I have used my copy of %iver online for a total of $rsc2($duration($mpy(%pong,60)))
  264. w whois $1-
  265. who {
  266.   if ($1 != $null) {
  267.     if ($show) {
  268.       if ($form(who,start)) {
  269.         set %whomask $1
  270.         iiecho $readini %formats who start
  271.         unset %whomask
  272.       }
  273.       else iiecho .who of $hc($1) $str(-,40)
  274.       set %whochan on
  275.     }
  276.     .who $1-
  277.   }
  278.   else {
  279.     if ($show) {
  280.       if ($form(who)) {
  281.         set %whomask #
  282.         iiecho $readini %formats who start
  283.         unset %whomask
  284.       }
  285.       else iiecho .who of $hc(#) $str(-,40)
  286.       set %whochan on
  287.     }
  288.     .who #
  289.   }
  290. }
  291. whois {
  292.   if (%idlewhois == on) wii $1
  293.   else wi $1-
  294. }
  295. whowas {
  296.   set %whowas $addtok(%whowas,$$1,44)
  297.   .quote whowas $1-
  298. }
  299. wi {
  300.   set %whois $addtok(%whois,$$1,44)
  301.   .quote whois $1-
  302. }
  303. wii {
  304.   set %whois $addtok(%whois,$$1,44)
  305.   .quote whois $1 $1
  306. }
  307. ww whowas $1-
  308. ver {
  309.   if ($1 != $null) ctcp $nc($1) VERSION
  310.   elseif (($query($active)) || ($chan($active))) ctcp $active VERSION
  311.   else iecho Syntax: /ver [nick|chan]
  312. }
  313. xget {
  314.   if ($2 != $null) {
  315.     ctcp $nc($1) XDCC SEND #$2
  316.     if (%autoxdcc == on) set %xdccnicks $addtok(%xdccnicks,$nc($1),32)
  317.   }
  318.   elseif ((($query($active)) || ($chan($active))) && ($1 != $null)) ctcp $active XDCC SEND #$1
  319.   else iecho Syntax: /xget [nick|chan] <pack>
  320. }
  321. xlist {
  322.   if ($1 != $null) ctcp $nc($1) XDCC LIST
  323.   elseif (($query($active)) || ($chan($active))) ctcp $active XDCC LIST
  324.   else iecho Syntax: /xlist [nick|chan]
  325. }
  326.  
  327.